#define _CRT_SECURE_NO_WARNINGS 1
#include"string.h"

namespace x
{
	void test_string()
	{
		string s1("abcd");
		s1.insert(0, 'c');
		s1.push_back('a');
		s1 += 'a';
		s1.append("ee");
		s1 += "ff";
		cout << s1.c_str() << endl;
		for (auto e : s1)
		{
			cout << e << "";
		}
		cout << endl;
		auto it = s1.begin();
		while (it != s1.end())
		{
			cout << *it << "";
			++it;
		}
		cout << endl;
	}
	void test_string2()
	{
		string s1("abcd");
		//s1.insert(0, "%%");
		s1.insert(0, 'e');
		string s2 = s1.substr(2);
		string s3;
		s3 = s1;
		s3 = s3;
		cout << s3.c_str() << endl;
		if (s3 >= s1)
			cout << "yes" << endl;
		else
		{
			cout << "no" << endl;
		}
		/*size_t pos = s1.find('c');
		cout << pos << endl;*/
	}
}

int main()
{
	x::test_string2();
	return 0;
}